<!--
 * @Description: 
 * @Author: rendc
 * @Date: 2025-09-15 09:37:01
 * @LastEditors: rendc
 * @LastEditTime: 2025-09-15 11:36:05
-->
<!doctype html>
 <html lang="en">
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>
        盒子模型
    </title>
    </head>
    <style>    
.box {
    width: 50px;
    height: 50px;
    border: 1px;
    margin: 20px;
    border-radius: 4px;
    padding: 20px;
}
.left {
    float: left;
    width: 50%;
    margin: auto;
    padding: 0%;
} 
.right {
    float: right;
    width: 50%;
    margin: auto;
    padding: 0%;
}
    </style>
<body>
    <div>
        <div class="box left"style="background-color: red;" >
            左边
        </div>
        <div class="box left"style="background-color: blue;">
            右边 
        </div>
         <div class="box left"style="background-color: red;" >
            左边
        </div>
        <div class="box left"style="background-color: blue;">
            右边 
        </div>
    </div>
</body>
</html>
    